﻿@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Index</h2>

@*<form enctype="multipart/form-data" method="post" action="@Url.Action("SendImage")">
    <fieldset style="border: 2px groove #ccc; background: #e8eac9; width: 300px;">
        <legend> CARGAR IMAGEN </legend>

            <div style="width:120px; height:120px;border:1px solid">
                para visualizar la imagen*@
                @*<img alt="" src="@Url.Action("Preview", new {file=ViewBag.ImageUploaded})" />
                @if (!string.IsNullOrEmpty(ViewBag.ImageUploaded))
                {
                    <img src="@Url.Action("Preview", new {file=ViewBag.ImageUploaded})" />
                }
            </div>

        <label for="img">Seleccionar imagen:</label>
        <input type="file" name="img" /> <br />
        <input type="submit" />


    </fieldset>

</form>*@

<h2>Tutorial 1</h2>
@*Creamos un formulario que contendrá los campos a llenar*@
@using (Html.BeginForm("Index", "Inversion", FormMethod.Post, new { enctype = "multipart/form-data" }))
{   
    <input type="file" name="uploadfile1" id="uploadfile1" />
   
    @*Botón para guardar los valores*@
    <input type="submit" name="button1" id="button1" value="Guardar" />
}



@if (ViewBag.myimage != null)
{
    <img alt="imagen1" src="@Url.Content("~/Content/" + ViewBag.myimage)" />
}